<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:87:"/www/wwwroot/crm.liunuo.net/public/../application/user/view/analysis/index_mobile.phtml";i:1552999926;s:67:"/www/wwwroot/crm.liunuo.net/application/user/view/base_mobile.phtml";i:1552999924;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title><?php echo config('website.site_name')?></title>
<link rel="stylesheet" type="text/css" href="/static/hui/css/hui.css" />
<style>.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}</style>

</head>
<body>

<header class="hui-header">
    <div id="hui-back"></div>
    <h1>数据分析</h1>
    <div id="hui-header-menu" onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap">
    <div class="hui-list">
        <form action="<?php echo url('user/analysis/index'); ?>" class="layui-form" method="get">
            <div class="hui-form-items">
                <input type="date" name="dateframe" class="hui-button hui-button-large hui-date-picker" placeholder="<?php echo $dateframe; ?>" style="margin-top:20px;" />
            </div>
            <div class="hui-form-items">
                <div class="hui-form-select" style="width:100%; height:50px; line-height:50px; text-align:center; float:left;">
                    <select name="type">
                        <option value="">统计类型</option>
                        <option value="1">新增客户</option>
                        <option value="2">新增回访（跟踪）</option>
                        <option value="3">新增提醒</option>
                        <option value="4">新增交易</option>
                    </select>
                </div>
            </div>
            <button class="hui-button hui-button-large hui-primary ajax-search"><i class="fa fa-search"></i> 查看数据</button>
        </form>
    </div>
    
    <div class="hui-list">
        <div id="container" style="height: 400px;"></div>
    </div>
    
    
</div>
<br><br><br>

<div class="hui-slide-menu">
    <ul>
        <?php if(is_array($navbar) || $navbar instanceof \think\Collection || $navbar instanceof \think\Paginator): if( count($navbar)==0 ) : echo "" ;else: foreach($navbar as $key=>$v): if($v['id']=='1'): if(is_array($v['children']) || $v['children'] instanceof \think\Collection || $v['children'] instanceof \think\Paginator): if( count($v['children'])==0 ) : echo "" ;else: foreach($v['children'] as $key=>$n1): ?>
                    <li><a href="javascript:hui.open('<?php echo \think\Request::instance()->root(true); ?>/<?php echo $n1['url']; ?>');"><?php echo $n1['name']; ?></a></li>
                <?php endforeach; endif; else: echo "" ;endif; endif; endforeach; endif; else: echo "" ;endif; ?>
        <li><a href="javascript:hui.open('<?php echo url('user/index/logout'); ?>');">退出账户</a></li>
        <li style="padding-top:30px;">
            <button type="button" class="hui-button hui-button-large" onclick="hui.closeSlideMenu();">关闭菜单</button>
        </li>
    </ul>
</div>
<div id="hui-footer">
    <a href="javascript:hui.open('/user/');" id="nav-home">
        <div class="hui-footer-icons hui-icons-home"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="javascript:hui.open('/user/customer/track');" id="nav-news">
        <div class="hui-footer-icons hui-icons-news"></div>
        <div class="hui-footer-text">跟踪</div>
    </a>
    <div style="width:20%; text-align:center;" class="hui-fl">
        <img src="/static/hui/img/logo_footer.png" height="44" onclick="hui.open('/user/customer/');" />
    </div>
    <a href="javascript:hui.open('/user/customer/remind');" id="nav-forum">
        <div class="hui-footer-icons hui-icons-forum"></div>
        <div class="hui-footer-text">提醒</div>
    </a>
    <a href="javascript:hui.showSlideMenu();" id="nav-my" id="hui-header-menu" onclick="hui.showSlideMenu();">
        <div class="hui-footer-icons hui-icons-my"></div>
        <div class="hui-footer-text">我的</div>
    </a>
</div>
<script src="/static/hui/js/hui.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
hui.slideMenu();
//hui('#nav-my').pointMsg();
//hui('#nav-news').pointMsg('hot', null, null, null, '1px');
<?php $remind_sum= today_remind_sum();?>
hui('#nav-forum').pointMsg(<?php echo $remind_sum['count']; ?>);
</script>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base_mobile.js"></script>

<script src="/static/js/echarts.common.min.js"></script>  
<script type="text/javascript">
    var dom = document.getElementById("container");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    option = {
        title: {
            text: '<?php echo $dateframe; ?> - <?php echo $name; ?>',
            left: 'center'
        },
        tooltip : {
            trigger: 'axis',
            axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
            }
        },
        xAxis: {
            type: 'category',
            name: '日期',
            splitLine: {show: true},
            data: [
            <?php foreach ($array as $r) {?>
                '<?php echo $r; ?>',
            <?php }?>]
        },
        yAxis: {
            type: 'value'
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        series: [{
            name: '数量',
            data: [<?php foreach ($value as $r) {?>
                    <?php echo $r; ?>,
                    <?php }?>],
            type: 'line',
            label:{
                normal:{
                    show:true,
                    position:'top',
                    textStyle: {
                        color: '#333',
                        fontSize: 18
                    }
                }
            }
        }]
    };
    ;
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
</script>
<script type="text/javascript">
/* 修正 datepicker 样式 */
hui.datePicker();
</script>

</body>
</html>